<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Proposal_model extends CI_Model
{
	
	public function __construct()
	{
		parent::__construct();

	}
	public function  create_module($insert)
	{
		$this->db->insert('proposal_module',$insert);
	}
	
	public function create_feature($insert)
	{
		//feature
		$this->db->insert('proposal_feature',$insert);
	}
	
	public function get_all_modules()
	{
		return $this->db->get('proposal_module')->result();
	}
	
	public function get_features_by_module($module_id)
	{
		return $this->db->get_where('proposal_feature',array('module_id' => $module_id))->result();
	}
}
